from django.contrib import admin
from markdownx.admin import MarkdownxModelAdmin
from .models import Article, Category, Tag



@admin.register(Article)
class ArticleAdmin(MarkdownxModelAdmin):
    list_display = ('title', 'author', 'status', 'published_time')
    # readonly_fields = ('raw_content',)  # 显示防篡改字段
    # formfield_overrides = {
    #     models.TextField: {'widget': MarkdownxWidget(attrs={'rows': 30})}
    # }




admin.site.register(Category)
admin.site.register(Tag)
